Systems and Methods for Echo Cancellation and Echo Suppression

ABSTRACT

Traditionally, echo cancellation has employed linear adaptive filters to cancel echoes in a two way communication system. The rate of adaptation is often dynamic and varies over time. Disclosed are novel rates of adaptation that perform well in the presence of background noise, during double talk and with echo path changes. Additionally, the echo or residual echo can further be suppressed with non-linear processing performed using joint frequency-time domain processing.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates generally to two-way communications systems and, specifically, to the suppression and cancellation of echoes in two-way communications system.

2. Related Art

In a two-way communications system, such as a telephony system, echoes are distracting and undesirable. Two common types of echoes are hybrid echoes, which are typically caused by impedance mismatches in hybrid circuits deployed in central offices, and acoustic echoes where a sound produced by a speaker is picked up by the microphone.

FIG. 1 illustrates echoes in a typical telephonic system, depicted here as either landline based or mobile. During a call between telephone 102 and telephone 112, telephone 102 transmits signal 104 and receives signal 106. In addition, microphone 116 of telephone 112 picks up signal 104 produced by speaker 114 and adds it to signal 106. This is shown as acoustic echo 118. Speaker 114 and microphone 116 can alternatively be part of another type of communications device such as an external speaker and microphone attached to a personal computer providing voice over Internet protocol (VoIP) communications.

Echo cancellation is the process of removing the echo from a system by producing an estimate of the echo and subtracting it from the received signal. FIG. 2 illustrates a model for an acoustic echo that may be used to perform echo cancellation. From the perspective of telephone 112, signal 104 is a far-end signal and signal 106 is a near-end signal. Speaker 114 transmits far-end signal 104 to the user, which is echoed back to microphone 116 as an acoustic echo. Echo canceller 300 comprises echo approximator 304 and subtractor 302. Echo approximator 304 received the far-end signal 104 and approximates the echo 118 added to signal 106. Approximate echo 306 is subtracted from near-end signal 106 to produce near-end signal 308. If echo approximator 304 accurately approximates the echo 118, then subtracting approximate echo 306 from near-end signal 106 would produce a signal 308 that approximates acoustic signal 202 without the echo.

The echo cancellation of FIG. 2 is described in further detail in the signal processing diagram shown in FIG. 3. The signals illustrated are digital signals. Echo e(n) is modeled as the result of echo transfer function 306 with impulse response s(k) applied to far-end signal x(n) and added with adder 308 to near-end signal d(n) resulting in a composite signal y(n). Generally, the index n is a time index that is a discrete time variable and the index k is the sampling time index of an impulse response. Adaptive filter 304 having impulse response h(k) approximates the echo of far-end signal x(n) shown as approximate echo ê(n). Subtractor 302 subtracts approximate echo ê(n) from signal y(n) to produce signal z(n) which is an approximation to near-end signal d(n).

Mathematically, the total received signal at the microphone is

y(n)=e(n)+d(n),   (1)

where the echo is modeled by

$\begin{matrix} {{{e(n)} = {\sum\limits_{k = 0}^{L - 1}{{s^{*}(k)}{x\left( {n - k} \right)}}}},} & (2) \end{matrix}$

where s(k) is a finite impulse response of order L−1. The output of the echo canceller which is the signal transmitted by the telephone to the far-end is given by

z(n)=y(n)−ê(n)   (3)

where ê(n) is the estimated echo and is approximated using an adaptive linear filter of order L−1 given by

$\begin{matrix} {{{\hat{e}(n)} = {\sum\limits_{k = 0}^{L - 1}{{h^{*}\left( {n,k} \right)}{x\left( {n - k} \right)}}}},} & (4) \end{matrix}$

where h(n,k) is the impulse response of the adaptive filter at time sample n. It should be noted that since the filter is adaptive it changes over time so the impulse response is also a function of time as shown.

The output of the echo canceller can also be expressed as

z(n)=d(n)+ε(n)   (5)

where ε(n)=e(n)−ê(n) is the residual echo. As the desired signal output signal z(n) is the near-end signal d(n) the objective of the echo canceller is to reduce the residual echo as much as possible.

One approach to adaptation of the adaptive filter is to minimize the mean squares error of the residual error ε(n). An adaptation approach known as least mean squares (LMS) yields the following adaptation equation

h(n+1,k)=h(n,k)+μ(n)z*(n)x(n−k),   (6)

where μ(n) is a non-negative number and is the adaptation coefficient and 0≦k<L. While LMS typically achieves a minimum, rate of adaptation defined by the adaptation coefficient is left unspecified. Appropriate adaptation rate control can yield a fast convergence of the echo approximator to the echo.

If the adaptation coefficient varies over time, the adaptive filter algorithm is referred to as a variable step size least mean squares (LMS) adaptive filtering algorithm. Prominent among these is the normalized LMS (NLMS) algorithm, which uses the adaptation coefficient:

$\begin{matrix} {{{\mu (n)} = \frac{\mu}{{LP}_{xx}^{L}(n)}},} & (7) \end{matrix}$

where LP_(xx) ^(L)(n) is a short-term energy of near-end signal x(n) over a window of L samples, where L is the adaptive filter. For convenience, the short term energy is expressed in terms of the average energy over the window. The arithmetic average energy is equal to

$\begin{matrix} {{P_{xx}^{L}(n)} = {\frac{1}{L}{\sum\limits_{l = 0}^{L - 1}{{x\left( {n - l} \right)}}^{2}}}} & (8) \end{matrix}$

and where μ is a constant between 0 and 2. The NLMS adaptive filtering algorithm is insensitive to the scaling of x(n), which makes it easier to control its adaptation rate by an appropriate choice of the adaptation coefficient. However, the NLMS adaptive filtering algorithm performs poorly when there is background noise and double talk in the received signal.

Hansler, et al. (“Signal Channel Acoustic Echo Cancellation”, Chapter 3 Adaptive Signal Processing, Springer, 2003) approximates the an optimal adaptation coefficient by

$\begin{matrix} {{{\mu (n)} = \frac{E\left\{ {{z(n)}{\varepsilon (n)}} \right\}}{{{LP}_{xx}^{L}(n)}E\left\{ {{z(n)}}^{2} \right\}}},} & (9) \end{matrix}$

where E{x} is the expected value of x. Hansler discloses an “NLMS” adaptation coefficient without the P_(xx) ^(L)(n) term. The P_(xx) ^(L)(n) term is added for consistency in this disclosure. Expected values require knowledge of the statistics of the signal and are not suited for a changing environment. For example, if the echo path changes, the expected values can change. In order to use equation (9), the adaptive filter would need to be aware of the changing statistics.

Several conditions can make adaptation more difficult, including double talk, echo path change and background noise. Double talk is a condition when both parties are speaking, so there is substantial energy in both the far-end and near-end signals. A change in echo path can occur when the phone is moved into another environment. This amounts to a change in echo transfer function 204. To address background noise, typical echo cancellers estimate the background noise and adjust the adaptation rate depending on the amount of noise present (e.g., higher adaptation when the noise is low and slower adaptation when the noise is high relative to the signal level.). For double talk, typical echo cancellers estimate the double talk periods and freeze adaptation during double talk periods.

Linear adaptive echo cancellation has been applied successfully to address echoes in the electronic environment. Acoustic echoes have additional, often significant, artifacts introduced by the background, such as noise, and dynamic echo paths causing the residual error. Non-linear processing (NLP) can be used in addition to or in place of the linear adaptive filtering. In a traditional system, NLP removes or suppresses the residual echo during single talk periods and it may insert comfort noise during that period. Generally, NLP does not do anything during double talk periods. Because the residual echo can still be significant during single and double talk periods, NLP is needed to add echo suppression to the linear echo cancellation.

An NLP system can remove the residual echo while maintaining the near signal quality for the listener. One technique used in an NLP system is a central clipping approach to remove the low volume signals, including the residual echo, at or below the central clipping threshold. A disadvantage of central clipping is that the near-end signal at or below the threshold is also removed, and that residual echo higher than the threshold of the central clipping may still be present. Another approach is comfort noise insertion, which removes or attenuates the linear echo canceller output and optionally inserts comfort noise when the far-end signals are higher than the output by a predetermined threshold and/or when the output is below the near-end signals by a different predetermined threshold. The performance under this approach is good when the residual echo is small and the linear echo canceller has converged well. However, in most acoustic cases, the residual echo is not small, even with a good linear echo canceller having good double talk detectors. Another known approach, switched loss, reduces the far-end signal volume when both the near-end and far-end-signals are high. By doing so, the echo is effectively reduced, as is the possibility of howling. The primary failing of traditional NLP is that it fails to suppress residual echo while maintaining full-duplex communications.

There is a need in the industry for an improved echo cancellation and/or suppression system which performs well in the presence of background noise, during periods of double talk and during changes in echo path, while maintaining full-duplex communications.

SUMMARY OF INVENTION

The full-duplex echo cancellation and suppression systems address the deficiencies in the prior art. One embodiment of an echo cancellation system comprises an echo approximator, a subtractor and an adaptation coefficient generator. The echo approximator is an adaptive linear filter and its adaptation is controlled by an adaptation coefficient provided by the adaptation coefficient generator. The adaptation coefficient generator generates an adaptation coefficient which approximates the optimal adaptation coefficient. The adaptation generator divides the result of an estimator function by a short term far-end power plus a predetermined value to prevent a division by zero. The estimator function can take several forms, but in general is a ratio of averages raised to a predetermined power. The ratio takes the average of the product of the output signal and the complex conjugate of the approximate echo generated by the echo approximator and divides it by the product of an average of the magnitude of the output signal and an average of the magnitude of the received signal power, where the received signal is the near-end signal mixed with the echo. In one embodiment the averages are standard arithmetic averages. In another embodiment the averages are root mean square averages. In still another embodiment, the averages are smooth averages. In still another embodiment, the averages are the square root of smooth averages of the magnitudes squared. A corresponding method generates an adaptation coefficient for an echo canceller using the same formulation described above.

In one embodiment of an echo suppression system, a filter bank is applied to the far-end signal to separate the signal into frequency sub-bands forming a joint time-frequency domain signal. A second filter bank separates an input signal into input frequency sub-band signals. The input signal can be the received signal at a microphone or can be the output of a linear echo cancellation system. Associated with each frequency sub-band is a non-linear processing unit, which performs non-linear processing on the input signal using the far-end signal to suppress the echo on a per sub-band basis.

In another embodiment, within each sub-band is also associated a linear echo canceller to partially cancel the echo. In this embodiment, the non-linear processing unit suppresses the residual echo.

One embodiment of the non-linear processing unit employs central clipping to suppress the echo. In another embodiment, comfort noise insertion is employed. In yet another embodiment, switched loss is employed. In still another embodiment, the received signal is attenuated by a scale factor determined by an estimator unit. In still another embodiment, the received signal is processed through a linear filter with coefficients determined by an estimator unit. In still another embodiment, the estimator unit feeds back estimates to the echo canceller to refine the adaptation coefficient for the echo canceller.

Other systems, methods, features, and advantages of the present disclosure will be or become apparent to one with skill in the art upon examination of the following drawings and detailed description. It is intended that all such additional systems, methods, features, and advantages be included within this description, be within the scope of the present disclosure, and be protected by the accompanying claims.

BRIEF DESCRIPTION OF DRAWINGS

Many aspects of the disclosure can be better understood with reference to the following drawings. The components in the drawings are not necessarily to scale, emphasis instead being placed upon clearly illustrating the principles of the present disclosure. Moreover, in the drawings, like reference numerals designate corresponding parts throughout the several views.

FIG. 1 illustrates a typical telephonic system;

FIG. 2 illustrates a typical echo cancellation system;

FIG. 3 is a signal processing diagram of a typical echo cancellation system;

FIG. 4 illustrates an exemplary embodiment of an echo cancellation system;

FIG. 5 illustrates a linear adaptive echo canceller using the adaptation system using a synthetic echo;

FIG. 6 illustrates a full duplex sub-band non-linear processing system;

FIG. 7 illustrates a full duplex sub-band non-linear processing system with a linear echo canceller;

FIG. 8 illustrates a full duplex sub-band non-linear processing system with sub-band linear echo cancellers;

FIG. 9 illustrates an echo cancellation system with sub-band linear echo cancellers;

FIG. 10 shows an exemplary embodiment of a sub-band non-linear processing unit;

FIG. 11 shows another embodiment of a sub-band non-linear processing unit;

FIG. 12 shows an embodiment of one sub-band non-linear processing unit with a sub-band linear echo canceller;

FIG. 13 shows another embodiment of one sub-band non-linear processing unit with a sub-band linear echo canceller;

FIG. 14 shows a telephonic communications system including a hybrid circuit;

FIG. 15 shows a telephonic communications system where an echo canceller built into or attached to the hybrid circuit; and

FIG. 16 shows another telephonic communications system where an echo canceller is built into a telephone.

DETAILED DESCRIPTION

A detailed description of embodiments of the present invention is presented below. While the disclosure will be described in connection with these drawings, there is no intent to limit it to the embodiment or embodiments disclosed herein. On the contrary, the intent is to cover all alternatives, modifications and equivalents included within the spirit and scope of the disclosure.

FIG. 4 illustrates an exemplary embodiment of an echo cancellation system. Echo cancellation system 400 comprises echo approximator 302 and subtractor 304 which function as previously described. Specifically, echo approximator 302 generates an approximate echo which is then subtracted from the received signal y(n) at microphone 116 and produces an echo cancelled output signal z(n). It further comprises adaptation coefficient generator 402 which can use the received signal y(n), the output signal z(n), the far-end signal x(n) and the approximate echo ê(n) to generate an adaptation coefficient μ(n) for every time index n. The adaptation coefficient can the be used with equation (6) to control the adaptation rate of echo approximator 302.

Dotted box 410 represents the echo generation produced by the environment which is modeled as echo transfer function 306 with impulse response s(k) and adder 308. These elements are not part of the echo cancellation system, but illustrate the signal processing environment of a telephone.

The echo approximator, subtractor and adaptation coefficient generator made reside in software, firmware or implemented in hardware or some combination thereof. One such implementation would be as software or firmware executed on a digital signal processor (DSP) where each component described would be implemented as a set of instructions for the digital signal processor. In another embodiment, some of the functionality could be implemented as software or firmware executed on a DSP with some portions of implemented with application specific logic.

Adaptation coefficient generator 402 approximates the optimal adaptation coefficient which can be expressed by

$\begin{matrix} \begin{matrix} {{\mu (n)} = \frac{{{z^{*}(n)}{\varepsilon (n)}} + {{z(n)}{\varepsilon^{*}(n)}}}{2{{z(n)}}^{2}{{LP}_{xx}^{L}(n)}}} \\ {{= \frac{{Re}\left\{ {{z(n)}{\varepsilon^{*}(n)}} \right\}}{{{z(n)}}^{2}{{LP}_{xx}^{L}(n)}}},} \end{matrix} & (10) \end{matrix}$

where ∥ is standard notation of the absolute value, Re{ } is standard notation for the real part of a complex number, and * is standard notation for the complex conjugate of a complex number.

When all signals are real, then z*(n)=z(n) and ε*(n)=ε(n) and equation (10) becomes

$\begin{matrix} {{\mu (n)} = {\frac{{{z(n)}{\varepsilon (n)}}}{{{z(n)}}^{2}{{LP}_{xx}^{L}(n)}}.}} & (11) \end{matrix}$

Equation (11) has advantages over equation (9) in the prior art. First, equation (11) is an optimal adaptation coefficient while equation (9) is an approximation to an optimal adaptation coefficient. Second, equation (9) does not perform well in the presence of background noise, during double talk or with the echo path changing, whereas equations (10) and (11) are optimal under those conditions. Finally, equation (10) and (11) do not require statistics of any signal and only uses a short term average of any signal.

Unfortunately, the residual echo ε(n) is not directly available. In principle, estimating the residual echo is a difficult problem. However, the adaptation coefficient of equations (10) and (11) can be made more tractable by using averages over an observation window rather than values at a given time. As a result equation (10) can be estimated by using

$\begin{matrix} {{{\mu (n)} = \frac{{Re}\left\{ {P_{z\; \varepsilon}^{N}(n)} \right\}}{{P_{zz}^{N}(n)}{{LP}_{xx}^{L}(n)}}},} & (12) \end{matrix}$

where P_(zε) ^(N)(n) is an arithmetic average of z(n)ε*(n) over a given period of time and is defined as

$\begin{matrix} {{P_{z\; \varepsilon}^{N}(n)} = {\frac{1}{N}{\sum\limits_{l = 0}^{N - 1}{{z\left( {n - l} \right)}{{\varepsilon^{*}\left( {n - l} \right)}.}}}}} & (13) \end{matrix}$

where N is the length of the smooth observation window. Equation (12) is more usable than equation (10) in that it is easier to estimate values such as the residual echo over a time window rather than for each point in time. Furthermore, the use of time averages smoothes the adaptation coefficient so that abrupt changes in the adaptation of the adaptive filter are mitigated and the adaptive filter maintains a smooth function.

The arithmetic averages in equation (12) as well as equations (10) and (11) can be generalized by a generic average. It should be noted that the operator

{ } used in this disclosure and related operators

{ },

{ }, are intended to convey a generic sense of an average. Within the same equation the

{ } operator may convey a different average if the operands are different. For example within the same equation

{a(n)} may be an arithmetic average of a(n) over an observation window of size M and

{b(n)} may be a root mean square average of b(n) over an observation window of size N. The use of subscripts are used to indicate that two averages are of potentially different types even with the same operand, for example if

{a(n)} appears twice in an equation the same average is intended to be used. However, if

{a(n)} and

{a(n)}, they should not be assumed to be the same averages. Furthermore, depending on the context and desired implementation

{ } can be selected from a variety of averages including but is not limited to arithmetic averages, root mean square averages, harmonic averages, the smooth averages described below or their weighted variants as well as other less conventional averages such as the median, the maximum, or the mode over an observation window.

It is convenient for the sake of this disclosure to introduce the following notations,

{tilde over (P)} _(xy) ^(α)(n)=αx(n)y*(n)+(1−α){tilde over (P)} _(xy) ^(α)(n−1)   (14)

and

{tilde over (P)} _(x) ^(α)(n)=α|x(n)|+(1−α){tilde over (P)} _(x) ^(α)(n−1),   (15)

where 0<α<1. Equation (14) and (15) are smooth averages which approximate an arithmetic average for the appropriate choice of α. Typically, with α is inversely proportional to N,

{tilde over (P)}_(xy) ^(α)(n)≈P_(xy) ^(N)(n).   (16)

Using the approximation given in equation (14) with equation (12) requires less memory than storing old signal values in computing the adaptation coefficient. Regardless of the simplifications, P_(zε) ^(N)(n) may still be difficult to estimate.

It is desirable that the adaptation coefficient be a function of signals available to the echo canceller and approximate the optimal adaptation coefficient of equations (10) or (11) or the time averaged adaptation coefficient of equation (12). Signals readily accessible to the echo canceller include the far-end signal x(n), the received signal at the microphone y(n), the echo canceller output signal z(n), and the approximate echo ê(n). This leads to a general form of an adaptation coefficient given by

$\begin{matrix} {{\mu (n)} = {\frac{f\left( {x,y,\hat{e},z,n} \right)}{{{LP}_{xx}^{L}(n)} + \Delta}.}} & (17) \end{matrix}$

In equation (17), P_(xx) ^(L) can be generalized to any average of |x(n)|² resulting in

$\begin{matrix} {{\mu (n)} = {\frac{f\left( {x,y,\hat{e},z,n} \right)}{{L\; \left\{ {{x(n)}}^{2} \right\}} + \Delta}.}} & (18) \end{matrix}$

A noteworthy example is when

{|x(n)|²}={tilde over (P)}_(xx) ^(α)(n). The adaptation coefficients in equations (17) and (18) can be completely determined since x(n) is the far-end signal which is the signal produced by the speaker (such as in a telephone), y(n) is the signal received by the microphone, ê(n) is the approximate echo generated by the echo canceller and z(n) is the output of the echo canceller, all quantities available to the echo canceller. The constant Δ is a small number designed to prevent μ from becoming large during periods of silence in the far-end signal, i.e., when P_(xx) is zero or near zero. Essentially the constant Δ is used to prevent division by zero. Often, it is desirable to maintain the adaptation coefficient below a given maximum value μ_(max) to maintain bounds on the adaptation. To this end, a limiter function,

(x)=max(μ_(max),min(0,x)), can be applied to the result of equation (17) and/or (18) to maintain the value of the adaptation coefficient between 0 and μ_(max). In equation (17) and (18), f is an estimator function, which is a non-negative function that is approximately optimal against background noise, double talk and echo path changing, and P_(xx) ^(L) normalizes it in accordance with the far-end power.

An example of such an estimator is given by the general equation

$\begin{matrix} {{f\left( {x,y,\hat{e},z,n} \right)} = \left\lbrack \frac{{{\left\{ {{z(n)}{{\hat{e}}^{*}(n)}} \right\}}}^{2}}{\left\{ {{z(n)}}^{2} \right\} \left\{ {{y(n)}}^{2} \right\}} \right\rbrack^{v}} & (19) \end{matrix}$

where v is a non-negative value. If v equals ½, then the estimator is inversely proportional to the output power. During periods of high background noise or near-end talk where the output power z(n) of the echo canceller increases. According to equation (19) the estimator is responsive to periods of high background noise and double talk and the adaptation is slowed during these periods. When the echo path changes the cross correlation average, |

{z(n)ê*(n)}|², increases causing the adaptive filter to more quickly adapt to the change in the echo path.

In one embodiment arithmetic averages are used, so equation (19) becomes

$\begin{matrix} {{{f\left( {x,y,\hat{e},z,n} \right)} = \left\lbrack \frac{{{P_{z\; \hat{e}}^{N_{1}}(n)}}^{2}}{{P_{zz}^{N_{2}}(n)}{P_{yy}^{N_{3}}(n)}} \right\rbrack^{v}},} & (20) \end{matrix}$

where arbitrary observation window sizes have be given to each of the averages in equation (20). However, the same observation window can be used (i.e., N₁=N₂=N₃.)

In another embodiment smooth averages are used, so equation (19) becomes

$\begin{matrix} {{f\left( {x,y,\hat{e},z,n} \right)} = \left\lbrack \frac{{{{\overset{\sim}{P}}_{z\; \hat{e}}^{\beta_{1}}(n)}}^{2}}{{{\overset{\sim}{P}}_{zz}^{\beta_{2}}(n)}{{\overset{\sim}{P}}_{yy}^{\beta_{3}}(n)}} \right\rbrack^{v}} & (21) \end{matrix}$

again arbitrary observation window sizes have be given to each of the averages in equation (21). Once again, the same window can be used (i.e., β₁=β₂=β₃).

In another embodiment, the estimator function is given by the equation.

$\begin{matrix} {{{f\left( {x,y,\hat{e},z,n} \right)} = \left\lbrack \frac{{\left\{ {{z(n)}{{\hat{e}}^{*}(n)}} \right\}}}{\left\{ {{z(n)}} \right\} \left\{ {{y(n)}} \right\}} \right\rbrack^{2\; v}},} & (22) \end{matrix}$

Equation (22) is similar to equation (19) except that in the denominator the averages of |z(n)| and |y(n)| is used instead of |z(n)|² and |y(n)|² In fact, equation (22) is a generalization of equation (19). In particular if the root-mean-square (RMS) average is used in the denominator then

{|z(n)|}=√{square root over (P_(zz) ^(N) ² (n))} and

{|y(n)|}=√{square root over (P_(yy) ^(N) ³ (n))} and an arithmetic average is used in the numerator, then equation (22) simplifies to equation (20). If the square root of the smooth average of |z(n)|² and |y(n)|² is used, i.e.,

{|z(n)|}=√{square root over ({tilde over (P)}_(zz) ^(β) ² (n))} and

{|y(n)|}=√{square root over ({tilde over (P)}_(yy) ^(β) ³ (n))}, then equation (22) simplifies to equation (21). Another noteworthy average that can be used is given by equation (23)

$\begin{matrix} {{\left\{ {{z(n)}} \right\}} = {\sqrt[\gamma]{\frac{1}{N}{\sum\limits_{l = 0}^{N - 1}{{z\left( {n - l} \right)}}^{\gamma}}}.}} & (23) \end{matrix}$

In particular the average of equation (23) becomes an arithmetic average of |z(n)| when γ=1 and an RMS average when γ=2. Furthermore, when γ=∞,

{|z(n)|}32 max{z(n) over the observation window}.

Other embodiments use the smooth average variant of equation (23) can also be used in particular

{|z(n)|}=^(γ)√{square root over ({circumflex over (P)}_(z) ^(γ,β) ² (n))}, where in general,

{circumflex over (P)} _(x) ^(γ,α)(n)=α|x(n)|^(γ)+(1−α){circumflex over (P)} _(x) ^(γ,α)(n−1).   (24)

In the embodiment when γ=1, equation (22) becomes,

$\begin{matrix} {{f\left( {x,y,\hat{e},z,n} \right)} = {\left\lbrack \frac{{{\overset{\sim}{P}}_{z\; \hat{e}}^{\beta_{1}}(n)}}{{{\overset{\sim}{P}}_{z}^{\beta_{2}}(n)}{{\overset{\sim}{P}}_{y}^{\beta_{3}}(n)}} \right\rbrack^{2v}.}} & (25) \end{matrix}$

Because the smooth averages can be updated by using |z(n)| and |y(n)| rather than |z(n)|² and |y(n)|² avoiding extra multiplications and square root operations, equation (25) is a computationally more efficient estimator function. Experimentally, it has been shown that these estimators work well even in the presence of double talk, background noise and echo path changing.

The optimality of equation (10) and (11) can be derived by minimizing

Δh(n,k)=s(k)−h(n,k),   (26)

with respect to the adaptation coefficient. Ideally, impulse response of the adaptive filter h(n,k) and the impulse response of the echo transfer function s(k) should be the same. However, in principle, they do not match. The error is the difference between the two and characterized by equation (26).

Equation (26) becomes

Δh(n+1,k)=Δh(n,k)−μ(n)z*(n)x(n−k)   (27)

after substituting adaptation equation (6). To minimize Δh, a least squares approach is taken, that is the cost function,

$\begin{matrix} {{E_{\Delta \; h}(n)} = {\sum\limits_{k = 0}^{L - 1}{{\Delta \; {h\left( {n,k} \right)}}}^{2}}} & (28) \end{matrix}$

is minimized. By substituting equation (27) into equation (28) and expanding the expression, the cost function can be re-written as

$\begin{matrix} {{E_{\Delta \; h}\left( {n + 1} \right)} = {{E_{\Delta \; h}(n)} - {{\mu (n)}{z^{*}(n)}{\varepsilon (n)}} - {{\mu (n)}{z(n)}{\varepsilon^{*}(n)}} + {{\mu^{2}(n)}{{z(n)}}^{2}{\sum\limits_{k = 0}^{L - 1}{{{x\left( {n - k} \right)}}^{2}.}}}}} & (29) \end{matrix}$

Finding an optimum value is achieved by finding a zero in the derivative of the cost function with respect to the adaptation coefficient. Specifically, the derivative is expressed as

$\begin{matrix} {{\frac{\partial}{\partial\mu}{E_{\Delta \; h}\left( {n + 1} \right)}} = {{{- {z^{*}(n)}}{\varepsilon (n)}} - {{z(n)}{\varepsilon^{*}(n)}} + {2\; {\mu (n)}{{z(n)}}^{2}{{{LP}_{xx}^{L}(n)}.}}}} & (30) \end{matrix}$

By setting the derivative to zero and solving for μ(n), the optimal adaptation coefficient given in equation (10) is found.

One caveat is that the initial conditions to the adaptive filter cannot be set to zero because that would cause estimated echo, ê(n) to be zero leading to a zero estimator function value. In addition, the adaptation coefficient should be monitored to insure it is not zero—for example, a small value can be substituted for the adaptation coefficient when it is zero.

FIG. 5 illustrates an embodiment of a linear adaptive echo canceller using an adaptation system with a synthetic echo. Like adaptive echo canceller 400, echo canceller 500 comprises echo approximator 302, subtractor 304 and adaptation coefficient generator 402. The linear adaptive echo canceller 500 comprises echo synthesizer 502 and adder 504 which mixes synthesized echo ē(n) with the signal received at the microphone y(n) to yield y(n). The nomenclature of the signals y(n) and y(n) differs slightly from that of the system described with reference to FIG. 4. In particular, the signal received at the microphone is labeled as y(n) instead of y(n). This is to preserve the notation of the adaptive coefficient formulae disclosed above. The synthesized echo ē(n) is the product of a transfer function with impulse responses s(k) of order L−1 applied to the far-end signal x(n), specifically,

$\begin{matrix} {{\overset{\_}{e}(n)} = {\sum\limits_{k = 0}^{L - 1}{{{\overset{\_}{s}}^{*}(k)}{{x\left( {n - k} \right)}.}}}} & (31) \end{matrix}$

Since the impulse response of the echo synthesizer is known, the adaptive filter coefficients can be initialized to that of the synthetic echo, i.e., s(k)=h(0,k). In this way, the synthetic echo is cancelled initially. Adding a synthetic echo component guarantees that the approximate error ê is not always zero, thus preventing the adaptive coefficient from reaching a state where the adaptive coefficient is constantly zero. Because the synthetic echo is artificially created, the impulse response is known so the linear adaptive filter will cancel the synthetic echo.

In the embodiment described above, linear adaptive echo cancellation has been disclosed. In addition to linear adaptive echo cancellation, non-linear processing can be used to suppress the residual echo left over from an adaptive echo cancellation system or even suppress the echo outright. Previous non-linear processing systems are undesirable, causing the telephone to behave as if constantly switching between full-duplex and half-duplex operation.

FIG. 6 illustrates a full duplex sub-band non-linear processing system. System 600 receives the far-end signal x(n) as well as the signal received at the microphone y(n) which comprises the near-end signal combined with any echo. The non-linear processing is applied in a joint frequency-time domain context. To achieve this, filter bank 602 separates the far-end signal into M frequency sub-bands—that is, each signal x_(i)(n) is formed from the frequency components of the far-end signal which fall into the ith frequency band. Likewise, filter bank 604 subdivides the signal y(n) into M frequency sub-bands. Non-linear processing unit 610 comprises M sub-units 612 a, 612 b, through 612 m which perform non-linear processing on each sub-band component. The non-linear processing sub-units are described in greater detail below. Finally, synthesis filter bank 620 combines the filtered output signal z_(i)(n) for each frequency sub-band into a combined output signal z(n). In one embodiment, the filter banks are constructed as described in Y. Lu and J. M. Morris, “Gabor Expansion for Adaptive Echo Cancellation”, IEEE Signal Processing Magazine, Vol. 16, No. 2, March, 1999.

FIG. 7 illustrates an alternative embodiment which is similar to the non-linear processing system described in FIG. 6 except linear echo cancellation is performed by echo estimator 304 and subtractor 302. There also can be an adaptation coefficient generator which is not shown for clarity. Filter bank 702 performs the same function as filter bank 602, and filter bank 704 subdivides the output of the linear echo canceller signal {tilde over (z)}(n) into M frequency sub-band components, {tilde over (z)}_(i)(n). Non-linear processing unit 710 comprises M sub-units 712 a, 712 b, through 712 m which perform non-linear processing on each sub-band component. Finally, synthesis filter bank 720 combines the filtered output signal z_(i)(n) for each frequency sub-band into a combined output signal z(n). Unlike nonlinear processing unit 610, non-linear processing unit 710 in this embodiment is used to suppress the residual echo rather than the full echo. The non-linear processing is performed for each frequency sub-band by the non-linear processing sub-units.

In one embodiment, comfort noise insertion is used such that if the far-end signal is greater than the output of the linear echo canceller by a predetermined threshold and/or the output is below the signal received at the microphone by a different predetermined threshold, the output is removed. Most generally comfort noise insertion is stated as

$\begin{matrix} {{z_{i}(n)} = \left\{ \begin{matrix} {{g_{1}{{\overset{\sim}{z}}_{i}(n)}} + {g_{2}{{nc}_{i}(n)}}} & {\begin{matrix} {{{{if}\mspace{14mu} {dist}\left\{ {{d(n)},{{\overset{\sim}{z}}_{i}(n)}} \right\}} > {T_{1}\mspace{14mu} {and}\text{/}{or}}}\mspace{14mu}} \\ {{{dist}\left\{ {{y_{i}(n)},{{\overset{\sim}{z}}_{i}(n)}} \right\}} > T_{2}} \end{matrix}\;} \\ {{\overset{\sim}{z}}_{i}(n)} & {{otherwise},} \end{matrix} \right.} & (32) \end{matrix}$

where dist{a(n),b(n)} is a measure for the distance between two sequences a(n) and b(n) at time index n, T₁ and T₂ are the predetermined thresholds and nc_(i)(n) is comfort noise. There are many useful distance measures between two sequences. One useful example is the distance between the present signal values, (i.e., dist{a(n),b(n)}=|a(n)−b(n)|). Another useful is example takes the most recent N samples of each sample and apply a vector distance operation such as in equations (33) and (34):

$\begin{matrix} {{{dist}\left\{ {{a(n)},{b(n)}} \right\}} = {\sum\limits_{l = 0}^{N - 1}{{{a\left( {n - l} \right)} - {b\left( {n - l} \right)}}}}} & (33) \\ {{{dist}\left\{ {{a(n)},{b(n)}} \right\}} = {\sqrt{\sum\limits_{l = 0}^{N - 1}{{{a\left( {n - 1} \right)} - {b\left( {n - 1} \right)}}}^{2}}.}} & (34) \end{matrix}$

Unlike the traditional comfort noise insertion NLP method, this comfort noise insertion is performed on a per frequency sub-band basis. The attenuation terms g₁ and g₂ are typically predetermined numbers between and inclusive of 0 and 1. In one embodiment, g₁=0 and g₂=1, corresponds to a comfort noise replacement NLP method where the output of the echo canceller is completely replaced by comfort noise. In another embodiment, when g₁>0, the output of the echo canceller is attenuated but not removed, and corresponds to a “soft” NLP method used in traditional NLP. In yet another embodiment, nc_(i)(n)=0 for some or all frequency sub-bands, that is instead of comfort noise, silence is introduced.

As an example, if the far-end user has a lower pitch voice than the near-end user, they can both speak, but the non-linear processing sub-units responsible for the low frequency may replace the received microphone signal, since the near-end speaker's voice will not be affected having a higher pitch. Further, the echo from the far-end speaker would be replaced because the echo will generally be in the same frequency range. As a result, the residual echo is suppressed and both users can talk. Without sub-band NLP, either one user would be suppressed or the residual echo would be permitted to remain during this double talk period. This technique can also be applied to the NLP performed by non-linear processing unit 610.

FIG. 8 is another embodiment of a sub-band based echo cancellation system. System 800 differs from the previous embodiments in that the linear echo cancellation is performed per frequency sub-band. Filter bank 802 separates far-end signal x(n) into M frequency sub-band components. Filter bank 804 separates the signal y(n) into M frequency sub-band components. Linear echo canceller 810 comprises echo approximator 812 a, 812 b, through 812 m and subtractors 814 a, 814 b, through 814 m each of which perform linear echo cancellation within their respective sub-bands. Each can also include an adaptation coefficient generator (not shown). Non-linear processing unit 820 comprises M sub-units 822 a, 822 b, through 822 m which perform non-linear processing on each sub-band component. Finally, synthesis filter bank 830 combines the filtered output signal z_(i)(n) for each frequency sub-band into a combined output signal z(n). Within each sub-band is a complete echo cancellation system with a linear echo canceller and an NLP echo suppressor.

In another embodiment, central clipping is used, so that if the signal received at the microphone for particular frequency sub-band y_(i)(n) is below a central clipping threshold, that signal is simply removed. Mathematically, this can simply be expressed as

$\begin{matrix} {{z(n)} = \left\{ \begin{matrix} {{\overset{\sim}{z}}_{i}(n)} & {{{if}\mspace{14mu} {dist}\left\{ {{y_{i}(n)},0} \right\}} > T} \\ 0 & {{otherwise},} \end{matrix} \right.} & (35) \end{matrix}$

where T is a predetermined threshold. The suppression is performed on a per frequency sub-band basis which allows operation in a full-duplex setting.

In another embodiment, far-end attenuation is used along with a synthesis filter bank to reassemble far-end signal components that may have certain frequencies attenuated in accordance with the traditional far-end attenuation NLP.

FIG. 9 illustrates another embodiment of a sub-band linear echo cancellation system. System 900 is similar to system 800 except it does not have non-linear processing unit 820. Because each sub-band is a linear echo cancellation system in its own right, the optimal adaptation coefficients derived above can be applied independently per sub-band, that is, each sub-band would use its own μ_(i)(n). In each sub-band, certain statistical assumptions can be made within a sub-band that cannot be made in a full band environment (discussed further below) and, as a result, some averages such as P_(z) _(i) _(ε) _(i) ^(N)(n) are easier to estimate.

FIG. 10 shows a sub-band non-linear processing unit which can be used with systems 600, 700 and/or 800. Sub-band non-linear processing unit 1000 comprises estimator unit 1002 which receives the i^(th) sub-band component of the far-end signal shown as x_(i)(n) and the i^(th) sub-band component of the received signal in the case of system 600 shown as y_(i)(n) or the i^(th) sub-band component of the output of a linear echo canceller in the case of system 700 or 800 shown as {tilde over (z)}_(i)(n). Estimator unit 1002 computes a weight, w_(i)(n), which is applied by scaler 1004 to either y_(i)(n) or {tilde over (z)}_(i)(n), depending on which system is used to produce an output. Mathematically,

z _(i)(n)=w _(i)(n)y _(i)(n)

or

z _(i)(n)=w _(i)(n){tilde over (z)} _(i)(n).   (36)

For the sake of simplification in this example, {tilde over (y)}_(i)(n) is used to denote the input the sub-band non-linear processing unit, it equal to y_(i)(n) in system 600 and equal to {tilde over (z)}_(i)(n) in system 700 or 800. One adaptive method to adjust the weights is governed by the following equation:

$\begin{matrix} {{{w_{i}(n)} = {f\left( {u_{i}(n)} \right)}},{where}} & (37) \\ {{u_{i}(n)} = {\mathcal{L}\left( \frac{{_{1}\left\{ {{{\overset{\sim}{y}}_{i}(n)}}^{2} \right\}} - {{q_{i}^{*}\left( {n,M} \right)}_{1}\left\{ {{x_{i}\left( {n - M} \right)}}^{2} \right\}}}{{_{2}\left\{ {{{\overset{\sim}{y}}_{i}(n)}}^{2} \right\}} + \Delta_{i}} \right)}} & (38) \end{matrix}$

where Δ_(i) is a constant that prevents a divide by zero condition when {tilde over (y)}_(i) is zero over the time window. The function f is typically a non-negative monotonically increasing function with f(1)=1. Specifically f(x)=x^(v) can be used where v is a fractional value. For example, v could be selected to have a value of ½, so f(x)=√{square root over (x)}, but other values of v can be used depending on the application. The function

limits the result to be between and including 0 and 1, more specifically,

(x)=max(0,min(1,x)).   (39)

Regarding averages,

{|{tilde over (y)}_(i)(n)|²} and

{|{tilde over (y)}_(i)(n)|²} are averages of |{tilde over (y)}_(i)(n)|² over two observation windows, while these averages can be different types of averages over different observation windows, they often chosen to be the same type of average over the same observation window. Additionally,

{|x_(i)(n)|²} is an average value of |x_(i)(n)|² over another observation window which can be distinct from the observation windows for |{tilde over (y)}_(i)(n)|². The number K is the number which yields the maximum value for |q_(i)(n,K)|. The quantity q_(i)(n,k) is given by

$\begin{matrix} {{q_{i}\; \left( {n,k} \right)} = {\frac{\left\{ {{{\overset{\sim}{y}}_{i}(n)}{x\left( {n - k} \right)}} \right\}}{_{2}\left\{ {{x_{2}\left( {n - k} \right)}}^{2} \right\}}}} & (40) \end{matrix}$

where

{|x_(i)(n)|²} is an average value of |x_(i)(n)|² over an observation window. While typically the same type of average is used for

{|x_(i)(n)|²} and

{|x_(i)(n)|²}, the observation window used for

{|x_(i)(n)|²} is typically smaller than that used for

{|x_(i)(n)|²}. When arithmetic averages are used, equations (38) and (40) become

$\begin{matrix} {{{u_{i}(n)} = {\mathcal{L}\left( \frac{{{P_{{\overset{\sim}{y}}_{i}{\overset{\sim}{y}}_{i}}^{N_{1}}(n)} - {{q_{i}^{*}\left( {n,K} \right)}{P_{x_{i}x_{i}}^{N_{2}}\left( {n - K} \right)}}},}{{P_{{\overset{\sim}{y}}_{i}{\overset{\sim}{y}}_{i}}^{N_{3}}(n)} + \Delta_{i}} \right)}}{and}} & (41) \\ {{{q_{i}\; \left( {n,k} \right)} = {\frac{P_{{\overset{\sim}{y}}_{i}x_{i}}^{N_{4}}\left( {n,k} \right)}{P_{x_{i}x_{i}}^{N5}\left( {n - k} \right)}}},} & (42) \end{matrix}$

where N₁, N₂, N₃, N₄ and N₅ are observation window sizes and

$\begin{matrix} {{P_{xy}^{N}\left( {n,k} \right)} = {\sum\limits_{l = 0}^{N - 1}{{x\left( {n - 1} \right)}{{y^{*}\left( {n - l - k} \right)}.}}}} & (43) \end{matrix}$

Likewise if smooth averages are employed then equations (38) and (40) become

$\begin{matrix} {{{u_{i}(n)} = {\mathcal{L}\left( \frac{{{{\overset{\sim}{P}}_{{\overset{\sim}{y}}_{i}{\overset{\sim}{y}}_{i}}^{\beta_{1}}(n)} - {{q_{i}^{*}\left( {n,K} \right)}{{\overset{\sim}{P}}_{x_{i}x_{i}}^{\beta_{2}}\left( {n - K} \right)}}},}{{{\overset{\sim}{P}}_{{\overset{\sim}{y}}_{i}{\overset{\sim}{y}}_{i}}^{\beta_{3}}(n)} + \Delta_{i}} \right)}}{and}} & (44) \\ {{q_{i}\left( {n,k} \right)} = {\frac{{\overset{\sim}{P}}_{{\overset{\sim}{y}}_{i}x_{i}}^{\beta_{4}}\left( {n,k} \right)}{{\overset{\sim}{P}}_{x_{i}x_{i}}^{\beta_{5}}\left( {n - k} \right)}}} & (45) \end{matrix}$

where β₁, β₂, β₃, β₄ and β₅ are inversely proportional to observation window sizes and

{tilde over (P)} _(xy) ^(α)(n,k)=(1−α){tilde over (P)} _(xy) ^(α)(n−1,k)+αx _(i)(n)y _(i)*(n−k).   (46)

Equation (38) is actually an approximation of the following equation

$\begin{matrix} {{u_{i}\; (n)} = {\mathcal{L}\left( \frac{{_{1}\left\{ {{{\overset{\sim}{y}}_{i}(n)}}^{2} \right\}} - {_{1}\left\{ {{e_{i}(n)}}^{2} \right\}}}{{_{2}\left\{ {{{\overset{\sim}{y}}_{i}(n)}}^{2} \right\}} + \Delta_{i}} \right)}} & (47) \end{matrix}$

Because e_(i)(n) is not directly available and

{|e_(i)(n)|²} must be estimated. The method employed here finds a K that maximizes q_(i)(n,k) over a range of k, with the maximum value used to determine

{|e_(i)(n)|²} by equation (48),

{|e_(i)(n)|²}≈q_(i)*(n,K)

{|x_(i)(n−K)|²}.   (48)

Often the range of k is a small number, the maximum value of q_(i)(n,k) can be determined by brute force calculations. Alternatively, the range selected for k can also be selected based on resources available for a brute force calculation. Therefore, evaluation of equation (37) can be thought of as first estimating

{|e_(i)(n)|²}, the average echo power, using equation (47) and then applying the function f.

FIG. 11 shows another embodiment of a sub-band non-linear processing unit which can be used with systems 600, 700 and/or 800. Sub-band non-linear processing unit 1100 extends the processing beyond a simple weight into a filter, with filter coefficients w_(i)(n,k). Estimator unit 1102 estimates these weights and filter 1104 applies them to the signal {tilde over (y)}_(i), which is either y_(i) or {tilde over (z)}_(i), depending on the system used. The output signal is defined by

$\begin{matrix} {{z_{i}(n)} = {\sum\limits_{k = 0}^{K}{{{\overset{\sim}{y}}_{i}\left( {n - k - N} \right)}w_{i}\; {\left( {n,k} \right).}}}} & (49) \end{matrix}$

FIG. 12 shows an embodiment of one sub-band of an echo canceller such as that shown in system 800. A linear echo canceller comprising echo approximator 1202 and subtractor 1204 is shown along with a non-linear processing unit, comprising estimator unit 1206 and scaler 1208. Estimator unit 1206 function similarly to estimator unit 1002 except estimator unit 1206 has synthesized echo ê(n) available for use in determining the weight. Scaler 1208 applies the weight to echo cancelled signal y_(i)(n). In this embodiment the weight is still adaptively determined by equation (37). However, the u_(i)(n) is given by equation (50) as

$\begin{matrix} {{{u_{i}(n)} = {\mathcal{L}\left( \frac{{_{1}\left\{ {{{\overset{\sim}{y}}_{i}(n)}}^{2} \right\}} - {{q_{i}^{*}(n)}_{1}\left\{ {_{1}{{x_{i}(n)}}^{2}} \right\}}}{{_{2}\left\{ {{{\overset{\sim}{y}}_{i}(n)}}^{2} \right\}} + \Delta_{i}} \right)}},} & (50) \end{matrix}$

where

{|{tilde over (y)}_(i)(n)|²} and

{|y_(i)(n)|²} are averages of |{tilde over (y)}_(i)(n)|² over two observation windows, while these averages can be different types of averages over different observation windows, they often chosen to be the same type of average over the same observation window. Additionally,

{|x_(i)(n)|₂} is an average value of |x_(i)(n)|² over another observation window which can be distinct from the observation windows for |{tilde over (y)}_(i)(n)|². In addition q_(i)(n) is given by

$\begin{matrix} {{{q_{i}(n)} = \frac{{{\left\{ {{y_{i}(n)}{{\hat{e}}_{i}^{*}(n)}} \right\}}}^{2}}{_{2}\left\{ {{x_{i}(n)}}^{2} \right\} \left\{ {{{\hat{e}}_{i}(n)}}^{2} \right\}}},} & (51) \end{matrix}$

where

{|x_(i)(n)|²} is an average value of |x_(i)(n)|² over an observation window. While typically the same type of average is used for

{|x_(i)(n)|²} and

{|x_(i)(n)|²}, the observation window used for

{|x_(i)(n)|²} is typically smaller than that used for

{|x_(i)(n)|²}. Additionally,

{y_(i)(n)ê_(i)*(n)} is an average of y_(i)(n)ê_(i)*(n) and

{|ê_(i)(n)|²} is an average of |ê_(i)(n)|² each over an observation window which can be the same or distinct from the other averages in equations (50) and (51).

When arithmetic averages are used, equations (50) and (51) become

$\begin{matrix} {{{u_{i}\; (n)} = {\mathcal{L}\left( \frac{{P_{{\overset{\sim}{y}}_{i}{\overset{\sim}{y}}_{i}}^{N_{1}}(n)} - {{q_{i}^{*}(n)}{P_{x_{i}x_{i}}^{N_{2}}(n)}}}{{P_{{\overset{\sim}{y}}_{i}{\overset{\sim}{y}}_{i}}^{N_{3}}(n)} + \Delta_{i}} \right)}},{and}} & (52) \\ {{{q_{i}(n)}\; \frac{{{P_{y_{i}{\hat{e}}_{i}}^{N_{4}}(n)}}^{2}}{{P_{x_{i}x_{i}}^{N_{5}}(n)}{P_{{\hat{e}}_{i}{\hat{e}}_{i}}^{N_{6}}(n)}}},} & (53) \end{matrix}$

where N₁, N₂, N₃, N₄, N₅ and N₆ are observation window sizes.

Like equation Likewise if smooth averages are employed then equations (50) and (51) become

$\begin{matrix} {{{u_{i}(n)} = {\mathcal{L}\left( \frac{{{\overset{\sim}{P}}_{y_{i}{\overset{\sim}{y}}_{i}}^{\beta_{1}}(n)} - {{q_{i}^{*}(n)}{{\overset{\sim}{P}}_{x_{i}x_{i}}^{\beta_{2}}(n)}}}{{{\overset{\sim}{P}}_{{\overset{\sim}{y}}_{i}{\overset{\sim}{y}}_{i}}^{\beta_{3}}(n)} + \Delta_{i}} \right)}},{and}} & (54) \\ {{{q_{i}(n)}\; \frac{{{{\overset{\sim}{P}}_{y_{i}{\hat{e}}_{i}}^{\beta_{4}}(n)}}^{2}}{{{\overset{\sim}{P}}_{x_{i}x_{i}}^{\beta_{5}}(n)}{{\overset{\sim}{P}}_{{\hat{e}}_{i}{\hat{e}}_{i}}^{\beta_{6}}(n)}}},} & (55) \end{matrix}$

where β₁, β₂, β₃, β₄, β₅ and β₆ are inversely proportional to observation window sizes.

Equation (50) is also an approximation. In particular it is an approximation of

$\begin{matrix} {{u_{i}(n)} = {\mathcal{L}\left( \frac{{_{1}\left\{ {{{\overset{\sim}{y}}_{i}(n)}}^{2} \right\}} - {\left\{ {{\varepsilon_{i}(n)}}^{2} \right\}}}{{_{2}\left\{ {{{\overset{\sim}{y}}_{i}(n)}}^{2} \right\}} + \Delta_{i}} \right)}} & (56) \end{matrix}$

where

{|ε_(i)(n)|²} is the average power of the residual echo over an observation window. By using the following approximation,

{|ε_(i)(n)|²}≈q_(i)*(n)

{|x_(i)(n)|²},   (57)

Equation (50) is derived. Once again the process of determining the weight can be thought of as first approximating the average power of the residual echo, then using equation (56), and the applying the function f.

It should be noted that the mathematical basis for approximations (48) and (57) rely on the simplifying assumption that within a particular sub-band, the signals have the white noise property, that is their frequency response is essentially flat. While this is not true for a signal across all frequencies, if the sub-bands are selected sufficiently narrow, each signal will approximately exhibit the white noise property. Some cross-correlation terms which make estimating these quantities difficult in the context of a particular sub-band can be assumed to be zero simplifying the estimates of the echo and residual echo.

Because within a sub-band, it is possible to now estimate the echo power, and residual echo power, quantities which could not be easily estimated for a full time domain signal, additionally other averages based on the residual echo or echo such as P_(z) _(i) _(ε) _(i) ^(N)(n) or more generically

{|z_(i)(n)ε_(i)*(n)|²} can also be estimated in each sub-band more readily which can then be supplied to any attached linear echo canceller.

FIG. 13 shows another embodiment of one sub-band of an echo canceller such as that shown in system 800. A linear echo canceller comprising echo approximator 1302, subtractor 1304 and adaptation coefficient generator 1310 is shown along with a non-linear processing unit, comprising estimator unit 1306 and scaler 1308. Estimator unit 1306 function similarly to estimator unit 1206 except estimator unit 1306 can provide information to echo approximator 1302, for example, it can supply an approximation to P_({circumflex over (z)}) _(i) _(ε) _(i) ^(N) or

{|{circumflex over (z)}_(i)(n)ε_(i)*(n)|²} to adaptation coefficient generator 1310 which can be used to adjust the adaptation coefficient for echo estimator 1302.

As with the specific implementation of echo canceller 400 and 500, the various components of echo cancellation/suppression systems 600, 700, 800, and 900 including any comfort noise insertion module, central clipping module, scalars and/or estimator units, can be implemented in hardware or as software or firmware instructions to be executed by a processor such as a DSP. It can also be a combination of software or firmware and specialized circuitry.

FIG. 14 shows a telephonic communications system including a hybrid circuit. In telephony, echoes can also be produced by a hybrid circuit. During a call between telephone 102 and telephone 112, telephone 102 transmits signal 104 and receives signal 106. The signals 104 and 106 pass through at least one hybrid circuit 1402 which is part of the telephone network. The hybrid circuit 1402 reflects back a version of signal 104 into signal 106, which is shown as hybrid echo 1404. The existence of multiple sources of echo gives rise to several alternative implementations of the echo cancellation and suppression systems described above. While the echo cancellation/suppression is illustrated in a telephonic communications system, where the echo cancellation system is incorporated to telephone to address acoustic echo, the same systems described above can be employed to address electronic hybrid echo or can address both types of echo.

FIG. 15 shows a telephonic communications system where an echo canceller built into or attached to the hybrid circuit. Echo canceller 1502 is designed to remove the hybrid echo caused by hybrid circuit 108. The advantage and disadvantage of this approach is that the echo canceller addresses only the echo caused by hybrid circuit 108. Because one type of echo is addressed, it is simpler, but it also leaves acoustic echo 118.

FIG. 16 shows a telephonic communications system where an echo canceller is built into a telephone. In this example, from the perspective of telephone 1602, the signal 104 is the near-end signal and signal 106 is the far-end signal. Unlike telephone 102, echo canceller 1604 in telephone 1602 cancels acoustic echo caused by telephone 112. It may also cancel the hybrid echo. In fact, a single telephone can employ an “inbound” echo canceller as shown here and an “outbound” echo canceller, where the inbound echo canceller addresses the echo caused by the remote telephone and/or hybrid circuits, and the outbound echo canceller addresses the local acoustic echo.

It should be emphasized that the above-described embodiments are merely examples of possible implementations. Many variations and modifications may be made to the above-described embodiments without departing from the principles of the present disclosure. For example, while this disclosure is expressed in terms of a telephonic communications system, the echo cancellation and suppression system disclosed herein can apply to any two-way communications systems and particularly any which exhibits acoustic echo, especially devices that have both a microphone with a nearby speaker. As an example, it can apply to communications software or systems employed in a personal computer to drive a VoIP system. All such modifications and variations are intended to be included herein within the scope of this disclosure and protected by the following claims. 

1. In a two-way communications system, a method of cancelling an echo of a far-end signal comprising: approximating the echo by applying a transfer function to the far-end signal to generate an approximate echo, said transfer function having an impulse response and an order; subtracting the approximate echo from a received signal comprising a near-end signal and the echo to produce an output signal; generating an adaptation coefficient; adapting the transfer function by modifying the impulse response based on the adaptation coefficient; said adaptation coefficient is generated by dividing an value generated by an estimator function by a sum of a total energy of the far-end signal over a first observation window and a predetermined constant number; said estimator function generates a value on the basis of the received signal, the output signal, the far-end signal and/or the approximate echo.
 2. In the method of claim 1, where the total energy is an average of |x(n)|² over the first observation window times the order of the transfer function, where the average is an arithmetic average or a smooth average, where the first observation window has a size equal to the order of the transfer function, and where x(n)is the far-end signal and n is a sampling time index.
 3. The method of claim 1 further comprising: synthesizing a synthetic echo; and adding the synthetic echo to the received signal.
 4. In the method of claim 1, where the value generated by the estimator function is a ratio, having a denominator and a numerator, raised to a predetermined power, where the numerator is the real part or the absolute value of an average of z(n)ê*(n) over a second observation window and the denominator the product of an average of |z(n)| over a third observation window and an average of |y(n)| over a fourth observation window, where z(n) is the output signal, ê*(n) is the complex conjugate of the approximate echo, y(n) is the received signal, and n is a sampling time index.
 5. The method of claim 4, the second observation window, the third observation window and the fourth observation have the same size.
 6. In the method of claim 5, wherein the average of z(n)ê*(n) is a smooth average or an arithmetic average; wherein the average of |z(n)| is a smooth average of |z(n)|, the square root of the smooth average of |z(n)|², an arithmetic average of |z(n)| or a root mean square average of |z(n)|; and wherein the average of |y(n)| is a smooth average of |y(n)|, the square root of the smooth average of |y(n)|², an arithmetic average of |y(n)| or a root mean square average of |y(n)|.
 7. The method of claim 1, further comprising: separating the far-end signal into far-end frequency sub-band signals; separating the received signal into received frequency sub-band signals; and synthesizing the output signal from output frequency sub-band signals; wherein the steps of approximating an echo, subtracting the approximate echo, generating an adaptation coefficient and adapting the transfer function are performed on at least one sub-band.
 8. An echo cancellation system comprising: an echo approximator operable to apply a transfer function, having an impulse response and an order, to a far-end signal and produce an approximate echo; a subtractor operable to subtract the approximate echo from a received signal comprising a near-end signal and an echo of the far-end signal to produce an output signal; a means for generating an adaptation coefficient; wherein the impulse response of the transfer function is modified based on the adaptation coefficient.
 9. In the echo cancellation system of claim 8, where the means for generating the adaptation coefficient comprises an adaptation coefficient generator which generates the adaptation coefficient by dividing an value generated by an estimator function by a sum of a total energy of the far-end signal over a first observation window and a predetermined constant number; said estimator function generates a value on the basis of the received signal, the output signal, the far-end signal and/or the approximate echo.
 10. The echo cancellation system of claim 8 further comprising: an echo synthesizer operable to generate a synthetic echo from the far-end signal; and an adder operable to add the synthetic echo to the received signal.
 11. In the echo cancellation system of 9, where the value generated by the estimator function is a ratio, having a denominator and a numerator, raised to a predetermined power, where the numerator is the real part or the absolute value of an average of z(n)ê*(n) over a second observation window and the denominator the product of an average of |z(n)| over a third observation window and an average of |y(n)| over a fourth observation window, where z(n) is the output signal, ê*(n) is the complex conjugate of the approximate echo, y(n) is the received signal and n is a sampling time index.
 12. In the echo cancellation system of 11, wherein the average of z(n)ê*(n) is a smooth average or an arithmetic average; wherein the average of |z(n)| is a smooth average of |z(n)|, the square root of the smooth average of |z(n)|², an arithmetic average of |z(n)| or a root mean square average of |z(n)|; wherein the average of |y(n)| is a smooth average of |y(n)|, the square root of the smooth average of |y(n)|², an arithmetic average of |y(n)| or a root mean square average of |y(n)| and; where the total energy is an average of |x(n)|² over the first observation window times the order of the transfer function, where the first observation window has a size equal to the order of the transfer function, and where the average is an arithmetic average or a smooth average.
 13. An echo suppressor comprising: a first filter bank for separating a far-end signal into a plurality of far-end frequency sub-band signals; a second filter bank for separating an input signal into a plurality of input frequency sub-band signals; a plurality of non-linear processing units where each non-linear processing unit receives one of the plurality of far-end frequency sub-band signals and one of the plurality of the input frequency sub-band signals and produces an output frequency sub-band signal which is echo-suppressed; and a third filter bank for synthesizing a combined output signal from all the output frequency sub-band signals.
 14. In the echo suppressor of claim 13, where the input signal is received from a linear echo cancellation signal.
 15. In the echo suppressor of claim 13 where each non-linear processing unit applies central clipping.
 16. In the echo suppressor of claim 13, further comprising a plurality of linear echo cancellation systems each coupled to each of the non-linear processing units and each comprising an echo approximator operable to approximate an approximate echo from the far-end frequency sub-band signal and a subtractor operable to subtract the approximate echo from the input frequency sub-band signal.
 17. In the echo suppressor of claim 16 where each non-linear processing unit applies comfort noise insertion.
 18. In the echo suppressor of claim 16 where each non-linear processing unit comprises an estimator unit operable to receive the input frequency sub-band signal and the far-end frequency sub-band signal and a scaler where the estimator determines a scale factor to apply to the input frequency sub-band signal and the scaler scales the input frequency sub-band signal by the scale factor.
 19. In the echo suppressor of claim 13 where each non-linear processing unit comprises an estimator unit and a filter having filter coefficients where the estimator determines the filter coefficients and the filter is applied to the input frequency sub-band signal.
 20. In the echo suppressor of claim 13 where each non-linear processing unit comprises an estimator unit operable to receive the input frequency sub-band signal, the approximate echo and the far-end frequency sub-band signal and a scaler where the estimator determines a scale factor to apply to the input frequency sub-band signal and the scaler scales the input frequency sub-band signal by the scale factor.
 21. In a two way communications system, a method of echo suppression comprising: separating a far-end signal into a plurality far-end frequency sub-band signals corresponding to a predetermined set of frequency sub-bands; separating an input signal into a plurality of input frequency sub-band signals; for each input frequency sub-band signal, applying non-linearly processing to the input frequency sub-band signal using a corresponding far-end frequency sub-band from the plurality of far-end frequency sub-band signals to produce a output frequency sub-band signal which is echo suppressed; and synthesizing a combined output signal from the output frequency sub-band signals.
 22. The method of claim 21, further comprising: cancelling an echo in a received signal with an echo cancellation system to produce the input signal.
 23. In the method of claim 21, where applying non-linear processing comprises applying central clipping.
 24. In the method of claim 21 further comprising: for input frequency sub-band signal, approximating an approximate echo from the corresponding far-end frequency sub-band signal and subtracting the approximate echo from the input frequency sub-band signal.
 25. In the method of claim 24, where applying non-linear processing comprises applying comfort noise insertion.
 26. In the method of claim 21, where applying non-linear processing comprises: determining a scale factor; and scaling the input frequency sub-band signal by the scale factor.
 27. In the method of claim 26, wherein determining a scale factor comprises: approximating an average power of an echo in the input frequency sub-band signal; calculating $\frac{{_{1}\left\{ {{{\overset{\sim}{y}}_{i}(n)}}^{2} \right\}} - {\left\{ {{e_{i}(n)}}^{2} \right\}}}{{_{2}\left\{ {{{\overset{\sim}{y}}_{i}(n)}}^{2} \right\}} + \Delta_{i}},$  to produce a first calculated value where

{|e_(i)(n)|²} is an average power of the echo over a first observation window,

{|{tilde over (y)}_(i)(n)|²} is a first average of |{tilde over (y)}_(i)(n)|² over a second observation window,

{|{tilde over (y)}_(i)(n)|²} is a second average of |{tilde over (y)}_(i)(n)|² over a third observation window, Δ_(i) is a predetermined number, and {tilde over (y)}_(i)(n) is the input frequency sub-band signal; restricting the first calculated value to either 0, 1 or a number in between and applying a monotonically increasing function to the first calculated value to produce the scale factor.
 28. In the method of claim 27, where

{|{tilde over (y)}_(i)(n)|²}=

{|{tilde over (y)}_(i)(n)|²}.
 29. In the method of claim 27, approximating further comprises: determining a value K which yields a maximum value of q_(i)(n,k) over a predetermined range of k where k is an integer and; multiplying q_(i)(n,K) with

{|x_(i)(n−K)|²} to produce the average power, where ${{q_{i}\left( {n,k} \right)} = {\frac{\left\{ {{{\overset{\sim}{y}}_{i}(n)}{x(n)}} \right\}}{_{2}\left\{ {{x_{i}\; \left( {n - k} \right)}}^{2} \right\}}}},$ and

{|x_(i)(n)|²} is a first average of |x_(i)(n)|² over a fourth observation,

{|x_(i)(n)|²} is a second average of |x_(i)(n)|² over a fifth observation window, and

{{tilde over (y)}_(i)(n)x(n)} is an average of {tilde over (y)}_(i)(n)x(n) over a sixth observation window.
 30. In the method of claim 29 where

{|{tilde over (y)}_(i)(n)|²} is an arithmetic average of |{tilde over (y)}_(i)(n)|² over the second observation window or a smooth average of |{tilde over (y)}_(i)(n)|² over the second observation window,

{|{tilde over (y)}_(i)(n)|²} is an arithmetic average of |{tilde over (y)}_(i)(n)|² over the third observation window or a smooth average of |{tilde over (y)}_(i)(n)|² over the third observation window,

{|x_(i)(n)|²} is an arithmetic average of |x_(i)(n)|² over the fourth observation window or a smooth average of |x_(i)(n)|² over the fourth observation window,

{|x_(i)(n)|²} is an arithmetic average of |x_(i)(n)|² over the fifth observation window or a smooth average of |x_(i)(n)|² over the fifth observation window, and

{{tilde over (y)}_(i)(n)x(n)} is an arithmetic average of {tilde over (y)}_(i)(n)x(n) over the sixth observation window or a smooth average of {tilde over (y)}_(i)(n)x(n) over the sixth observation window.
 31. In the method of claim 24, where applying non-linear processing comprises: determining a scale factor; and scaling the input frequency sub-band signal by the scale factor; said determining a scale factor comprises: approximating an average power of an residual echo in the input frequency sub-band signal; calculating $\frac{{_{1}\left\{ {{{\overset{\sim}{y}}_{i}\; (n)}}^{2} \right\}} - {\left\{ {{\varepsilon_{i}(n)}}^{2} \right\}}}{{_{2}\left\{ {{{\overset{\sim}{y}}_{i}(n)}}^{2} \right\}} + \Delta_{i}}$  to produce a first calculated value where

{|ε_(i)(n)|²} is an average power of the residual echo over a first observation window,

{|{tilde over (y)}_(i)(n)|²} is a first average of |{tilde over (y)}_(i)(n)|² over a second observation window,

{|{tilde over (y)}_(i)(n)|²} is a second average of |{tilde over (y)}_(i)(n)|² over a third observation window, Δ_(i) is a predetermined number, and {tilde over (y)}_(i)(n) is the input frequency sub-band signal; restricting the first calculated value to 0, 1; or a number in between and applying a monotonically increasing function to the first calculated value to produce the scale factor.
 32. In the method of claim 31, approximating further comprises: multiplying q_(i)(n) with

{|x_(i)(n)|²} to produce the average power, where ${q_{i}(n)} = \frac{{{\left\{ {y_{i}\; (n){{\hat{e}}_{i}^{*}(n)}} \right\}}}^{2}}{_{2}\left\{ {{x_{i}(n)}}^{2} \right\} \left\{ {{{\hat{e}}_{i}(n)}}^{2} \right\}}$ and

{|x_(i)(n)|²} is a first average of |x_(i)(n)|² over a fourth observation,

{|x_(i)(n)|²} is a second average of |x_(i)(n)|² over a fifth observation window, and

{y_(i)(n)ê_(i)*(n)} is an average of y_(i)(n)ê_(i)*(n) over a sixth observation window.
 33. In the method of claim 32 where

{|{tilde over (y)}_(i)(n)|²} is an arithmetic average of |{tilde over (y)}_(i)(n)|² over the second observation window or a smooth average of |{tilde over (y)}_(i)(n)|² over the second observation window,

{|{tilde over (y)}_(i)(n)|²} is an arithmetic average of |{tilde over (y)}_(i)(n)|² over the third observation window or a smooth average of |{tilde over (y)}_(i)(n)|² over the third observation window,

{|x_(i)(n)|²} is an arithmetic average of |x_(i)(n)|² over the fourth observation window or a smooth average of |x_(i)(n)|² over the fourth observation window,

{|x_(i)(n)|²} is an arithmetic average of |x_(i)(n)|² over the fifth observation window or a smooth average of |x_(i)(n)|² over the fifth observation window, and

{y_(i)(n)ê_(i)*(n)} is an arithmetic average of y_(i)(n)ê_(i)*(n) over the sixth observation window or a smooth average of y_(i)(n)ê_(i)*(n) over the sixth observation window. 